/*
    餐厅管理系统登陆引导界面
 */

package Interface;

import Basics.Balance.Finance;
import Basics.Infrustructure.Capacity;
import Basics.Infrustructure.Inventory;
import Basics.Menu.Menu;
import Basics.Staff.Staff;
import Manager.Manager;
import Diner.Diner;
import java.util.Scanner;

public class Login {
    private Staff staff;
    private Menu menu;
    private Inventory inven;
    private Finance pay;
    private Capacity capacity;

    public static void main (String... args){
//        System.out.println("hello, world!");

        Login login = new Login();                      // 创建登陆实例 login

        login.Welcomepage();                            // 登陆欢迎界面


    }

    public Login(){                                     // 创建餐厅基本环境实例
        staff = new Staff();
        menu = new Menu();
        inven = new Inventory();
        pay = new Finance();
        capacity = new Capacity();


    }

    private void Welcomepage(){
        /*
            功能：
                1. 引导用户选择身份：点餐者 / 管理者
                2.
         */

        Scanner scanner = new Scanner(System.in);
        prompt();
        String input = scanner.next();

        while(!input.equals("exit")){
            switch (identity()){
                case 1:
                    Diner din = new Diner();
                    din.DashBoard();
                case 2:
                    Manager man = new Manager(staff, menu, inven, pay, capacity);
                    man.login();
                default:
                    System.out.println("input error");
            }

            prompt();
            input = scanner.next();
        }

    }

    private int identity(){
        /*
            选择身份
            1 对应用餐者，2 对应管理者
         */

        return 0;
    }

    private void prompt(){
        /*
            引导方法
         */

    }

}
